﻿using WXWorkSvc.Common.Models;

namespace WXWorkSvc.Models;
public class ResponseCreateAuth : WXBase
{

    public string access_token { get; set; } = default!;
    public int expires_in { get; set; } = default!;
    public string permanent_code { get; set; } = default!;
    /// <summary>
    /// 代理服务商信息 应用被代理后才有该信息
    /// </summary>
    public Dealer_Corp_Info? dealer_corp_info { get; set; }
    /// <summary>
    /// 授权方企业信息
    /// </summary>
    public AuthCorpInfo auth_corp_info { get; set; } = default!;
    /// <summary>
    /// 授权信息，主要包括AgentId等
    /// </summary>
    public AuthInfo auth_info { get; set; } = default!;
    /// <summary>
    /// 授权管理员的信息，可能不返回
    /// </summary>
    public Auth_User_Info auth_user_info { get; set; } = default!;
    /// <summary>
    /// 推广二维码安装相关信息，扫推广二维码安装时返回。成员授权时暂不支持。（注：无论企业是否新注册，只要通过扫推广二维码安装，都会返回该字段）
    /// </summary>
    public Register_Code_Info? register_code_info { get; set; }
    public string state { get; set; } = default!;

    public class Dealer_Corp_Info
    {
        public string corpid { get; set; } = default!;
        public string corp_name { get; set; } = default!;
    }




    public class Auth_User_Info
    {
        public string userid { get; set; } = default!;
        public string open_userid { get; set; } = default!;
        public string name { get; set; } = default!;
        public string avatar { get; set; } = default!;
    }

    public class Register_Code_Info
    {
        public string register_code { get; set; } = default!;
        public string template_id { get; set; } = default!;
        public string state { get; set; } = default!;
    }

}
